﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%
        var page = ViewData["Page"] as PageEntity; %>
    <%=Html.Title("{0} - {1}", page.Name,ForumContext.Configuration.ForumName)%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%
    
    
        Html.RenderPartial("LogOn");

        Html.RenderPartial("Navigation");

        var _userInfo = ViewData["UserInfo"] as UserEntity;
    %>
    <div class="w100 white-space">
        <div class="fr w80">
            <div class="fr-widget">
                <table cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="fl fr-block rc-t w20">
            <div class="userinfo-extra">
                <%=!string.IsNullOrEmpty(_userInfo.Avatar) ? string.Format("<div class=\"user-avatar\"><img src=\"{0}\" style=\"width:{1}px\" /></div>",_userInfo.Avatar,ForumContext.Configuration.AvatarWidth,ForumContext.Configuration.AvatarHeight) : string.Empty%>
                <div class="fr-field bold center">
                    <span class="<%=_userInfo.CssClass%>">
                        <%=Html.Encode(_userInfo.UserName)%></span>
                </div>
                <div class="fr-field">
                    <dl>
                        <dt>
                            <%=ForumContext.GetText("USERINFO","Group") %>: </dt>
                        <dd class="<%=_userInfo.CssClass%>">
                            <%=Html.Encode(_userInfo.RoleName)%>
                        </dd>
                    </dl>
                </div>
                <div class="fr-field">
                    <dl>
                        <dt>
                            <%=ForumContext.GetText("USERINFO","RegDate") %>: </dt>
                        <dd>
                            <%=ForumContext.ShortDateTimeFormat(_userInfo.RegDate)%>
                        </dd>
                    </dl>
                </div>
                <div class="fr-field">
                    <dl>
                        <dt>
                            <%=ForumContext.GetText("USERINFO","TotalPosts") %>: </dt>
                        <dd>
                            <%=_userInfo.TotalPosts%>
                        </dd>
                    </dl>
                </div>
                <div class="fr-field">
                    <dl>
                        <dt>
                            <%=ForumContext.GetText("USERINFO","TotalVisits") %>: </dt>
                        <dd>
                            <%=_userInfo.TotalVisits%>
                        </dd>
                    </dl>
                </div>
            </div>
        </div>
    </div>
    <br class="clear-all" />
</asp:Content>
